//
//  BK_OD_Status.m
//  bestkeep
//
//  Created by TOPTEAM on 2017/3/10.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import "BK_OD_Status.h"
#import "BK_OD_Color.h"

@implementation BK_OD_Status

-(void)fillData:(id)data{
    BK_My_DetailOrder_CellModel *cellModel = data;
    
    BK_My_DetailOrder_Model *model = cellModel.OrderModel;
    
    NSString *Status = model.order_status_name;
    
    
    if (Status) {
        if([Status rangeOfString:@"交易关闭"].location !=NSNotFound){
            _lab_OrderStatus.textColor=kOrderBlack1;
        }
    }
    
    if (Status) {
        _lab_OrderStatus.text=Status;
    }
    
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        self.backgroundColor = [UIColor whiteColor];
        [self initView];
    }
    return self;
}

- (void)initView{
    _lab_OrderStatus = [UILabel new];
    _lab_OrderStatus.textAlignment=NSTextAlignmentCenter;
    _lab_OrderStatus.font=[UIFont boldSystemFontOfSize:18.0];
    _lab_OrderStatus.textColor=kOrderBKGreen;
    [self addSubview:_lab_OrderStatus];
    [_lab_OrderStatus mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right).mas_offset(0);
        make.left.equalTo(self.mas_left).mas_offset(0);
        make.top.equalTo(self.mas_top).mas_offset(0);
        make.bottom.equalTo(self.mas_bottom).mas_offset(0);
    }];
}

@end


